package IO.BIO;

import java.io.IOException;
import java.net.Socket;
import java.util.Scanner;


//让客户端进入阻塞状态
public class Client {
    public static void main(String[] args) {
        try {
            Socket socket = new Socket("127.0.0.1", 9098);
            //OUTPUT输出流，字面理解向外输出
            Scanner scanner = new Scanner(System.in);
            String next = scanner.next();
            socket.getOutputStream().write(next.getBytes());
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
